﻿<local:ChildWindowBase x:Class="DoubanFM.GeneralSettingWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:local="clr-namespace:DoubanFM"
        xmlns:resx="clr-namespace:DoubanFM.Resources"
		x:Name="Window"
		Title="{x:Static resx:Resources.GeneralSettingsButton}" Background="#FF813131">
	<StackPanel Width="300" Margin="10">
        <Grid Margin="0,2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <TextBlock Margin="0,0,10,0" VerticalAlignment="Center" Text="{x:Static resx:Resources.LanguageTextBlock}"/>
            <ComboBox x:Name="CbLanguage" Grid.Column="1"/>
        </Grid>
        <CheckBox x:Name="CheckBoxAdjustVolumeWithMouseWheel" Content="{x:Static resx:Resources.CheckBoxAdjustVolumeWithMouseWheel}" IsChecked="{Binding Settings.AdjustVolumeWithMouseWheel, Mode=TwoWay, Source={StaticResource Player}}" VerticalAlignment="Center" Margin="0,2"/>
        <CheckBox x:Name="CheckBoxIsSearchFilterEnabled" Content="{x:Static resx:Resources.CheckBoxIsSearchFilterEnabled}" IsChecked="{Binding Settings.IsSearchFilterEnabled, Mode=TwoWay, Source={StaticResource Player}}" VerticalAlignment="Center" Margin="0,2"/>
		<Grid Margin="0,2">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition/>
			</Grid.ColumnDefinitions>
            <TextBlock Margin="0,0,10,0" VerticalAlignment="Center" Text="{x:Static resx:Resources.OutputDevicesTextBlock}"/>
            <ComboBox x:Name="CbOutputDevice" Grid.Column="1" SelectionChanged="CbOutputDevice_SelectionChanged"/>
		</Grid>
        <GroupBox Header="{x:Static resx:Resources.ProxyServerGroupBox}" Margin="0,2">
			<StackPanel>
				<Grid Margin="2">
					<Grid.ColumnDefinitions>
						<ColumnDefinition/>
						<ColumnDefinition/>
						<ColumnDefinition/>
					</Grid.ColumnDefinitions>
                    <RadioButton x:Name="RbDefaultProxy" Click="ProxyKindChanged" Content="{x:Static resx:Resources.RbDefaultProxy}"/>
                    <RadioButton Grid.Column="1" x:Name="RbNoProxy" Click="ProxyKindChanged" Content="{x:Static resx:Resources.RbNoProxy}"/>
                    <RadioButton Grid.Column="2" x:Name="RbCustomProxy" Click="ProxyKindChanged" Content="{x:Static resx:Resources.RbCustomProxy}"/>
				</Grid>
				<Grid x:Name="CustomProxyPanel" IsEnabled="{Binding IsChecked, ElementName=RbCustomProxy}" Margin="2">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition/>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition/>
					</Grid.ColumnDefinitions>
					<Grid.RowDefinitions>
						<RowDefinition/>
						<RowDefinition/>
						<RowDefinition/>
					</Grid.RowDefinitions>
                    <Label Content="{x:Static resx:Resources.HostComputerLabel}"/>
                    <TextBox x:Name="TbHost" Grid.Column="1" Text="{Binding Settings.ProxyHost, Mode=TwoWay, Source={StaticResource Player}}" Height="20"/>
                    <Label Grid.Column="2" Margin="10,0,0,0" Content="{x:Static resx:Resources.PortLabel}"/>
                    <TextBox x:Name="TbPort" Grid.Column="3" Text="{Binding Settings.ProxyPort, Mode=TwoWay, Source={StaticResource Player}}" Height="20" MaxLength="10"/>
                    <Label Grid.Row="1" Content="{x:Static resx:Resources.UserNameLabel}"/>
                    <TextBox x:Name="TbProxyUsername" Grid.Row="1" Grid.Column="1" Text="{Binding Settings.ProxyUsername, Mode=TwoWay, Source={StaticResource Player}}" Height="20"/>
                    <Label Grid.Row="1" Grid.Column="2" Margin="10,0,0,0" Content="{x:Static resx:Resources.PasswordBlock}"/>
                    <PasswordBox x:Name="PbProxyPassword" Grid.Row="1" Grid.Column="3" PasswordChanged="PbProxyPassword_PasswordChanged" Height="20"/>
                    <Label Grid.Row="2" Grid.ColumnSpan="4" FontSize="11" Content="{x:Static resx:Resources.ProxyNoCredentialsLabel}"/>
                </Grid>
                <Button x:Name="BtnApplyProxy" HorizontalAlignment="Right" Grid.Column="1" Height="30" Margin="0,2" Click="BtnApplyProxy_Click" Content="{x:Static resx:Resources.BtnApplyProxy}"/>
            </StackPanel>
		</GroupBox>
	</StackPanel>
</local:ChildWindowBase>